import Mock from 'mockjs';

let account = [{
		key: "/account/info",
		method: "get",
		data: Mock.mock({
			'STATUS': "SUCCESS",
			'data': {
				'accountId': '@increment(1)',
				'storeId': /[0-9]/,
				'startDate': '@datetime("yyyy-MM-dd hh:mm:ss")',
				'endDate': '@datetime("yyyy-MM-dd hh:mm:ss")',
				'amount': /[0-9]/,
				'account|6': /[A-Z][0-9][a-z]/,
				'statu': true,
			}
		})
	},

	{
		key: "/account/list",
		method: "get",
		data: () => {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'data': {
					'current': 0,
					'size': 10,
					'pages': 6,
					'total': 55,
					"records|10": [{
						'accountId': '@increment(1)',
						'storeId': /[0-9]/,
						'startDate': '@datetime("yyyy-MM-dd hh:mm:ss")',
						'endDate': '@datetime("yyyy-MM-dd hh:mm:ss")',
						'amount': /[0-9]/,
						'account|6': /[A-Z][0-9][a-z]/,
						'statu': true,
					}]
				}
			});
		}
	},
	{
		key: "/account/info",
		method: "delete",
		data: function() {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'data': "",
			});
		}
	},
	{
		key: "/account/info",
		method: "put",
		data: function() {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'data': "",
			});
		}
	},
	{
		key: "/account/info",
		method: "post",
		data: function() {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'data': "",
			});
		}
	},
];

export default account;
